//全局路由守卫
import router from '@/router';
import { useMenuStore } from '@/stores/modules/menu';
import type { RouteRecordRaw } from 'vue-router';
import pinia from '@/stores';

router.beforeEach(async (to, from, next) => {
	const store = useMenuStore(pinia);
	const { addTagView } = store;
	next();
	addTagView(to as RouteRecordRaw);
});
